<h2>Maintenance</h2>

<p>To optimise page generation time Piwigo uses cached information. For example, instead of counting the number of photos contained in each album at each page reload this information is stored in the database. In theory this information should always be correct but sometimes an error can occur and cached information becomes out of date.</p>

<p>Some information becomes less useful as time goes by.  Deleting this useless information from the database will save you some disk space.</p>

<ul>
	<li><strong>Delete orphan tags</strong></li>
</ul>
<ul>
  <li><strong>Update albums informations:</strong> For each album, the following information is checked, and updated if necessary : list of parent albums, number of photos, last photo date, position among brother albums, position among all albums. This action also checks the representative photos consistency.</li>
  <li><strong>Update photos information:</strong> For each photo, information updated is : full path to file, average rate. <em>Warning</em>, do not mix up: metadata information must be synchronised from <span class="pwgScreen">Administration &raquo; Tools &raquo; synchronise</span>, or on the modification screen of a single photo (through <span class="pwgScreen">Photo</span> for example).</li>
</ul>
<ul>
  <li><strong>Repair and optimise the database:</strong>Perform re-order, repair and optimise operations on each table of the database.</li>
  <li><strong>Reinitialize integrity check</strong></li>
</ul>

<ul>
  <li><strong>Purge history details:</strong> Delete all lines from the history table. Screen <span class="pwgScreen">Administration &raquo; Tools &raquo; History</span> will not longer show information for the past history. <em>Warning:</em> all data will be lost, without any way to get them back.</li>
  <li><strong>Purge history summary:</strong> Delete all the summary information about visit history. This summary is calculated from the history details.</li>
  <li><strong>Purge sessions:</strong> Delete expired user sessions.</li>
  <li><strong>Purge never used notification feeds</strong></li>
  <li><strong>Purge searches history</strong></li>
  <li><strong>Purge compiled templates</strong></li>  
</ul>